﻿using System;
using System.Collections.Generic;
using System.Text;
using AD.DAL;
using AD.Model;
using System.Data;

namespace AD.BLL
{
    public class AccountFlowBLL
    {
        public static int GetDay(int userId, out int errcode)
        {
            return AccountFlowDAL.GetDay(userId, out errcode);
        }
        public static int Insert(AccountFlowMod inviteFlow)
        {
            return AccountFlowDAL.Insert(inviteFlow);
        }
        public static List<AccountFlowMod> QueryByPage(string filter, int pageSize, int index, out int MaxSize)
        {
            return AccountFlowDAL.QueryByPage(filter, pageSize, index, out  MaxSize);
        }

        public static int DeleteById(int id)
        {
            string filter = " AutoID=" + id;
            return AccountFlowDAL.Delete(filter);
        }

        public static int SumByUserId(int id)
        {
            return AccountFlowDAL.SumByUserId(id);
        }

        public static int DeleteByUserId(int id)
        {
            string filter = " UserId=" + id;
            return AccountFlowDAL.Delete(filter);
        }

        public static int Delete(int id) {
            string filter = " AutoID=" + id;
            return AccountFlowDAL.Delete(filter);
        }

        public static IList<AccountFlowMod> QueryFilterToList(string filter)
        {
            return AccountFlowDAL.QueryFilterToList(filter);
        }

        public static DataTable QueryFilterToTable(string filter)
        {
            return AccountFlowDAL.QueryFilterToTable(filter);
        }
    }
}